package com.example.demo.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.mapper.SingerMapper;
import com.example.demo.pojo.Singer;
import com.example.demo.pojo.User;
import com.example.demo.service.SingerService;
@Service
public class SingerServiceImpl implements SingerService{
	@Autowired
	private SingerMapper singerMapper;
	@Override
	public List<Singer> getSingerList() {
		// TODO Auto-generated method stub
		return singerMapper.getSingerList();
	}
	@Override
	public int addSinger(Singer singer) {
		
		return singerMapper.addSinger(singer);
	}
	@Override
	public List<Singer> searchSingerList(String singer_name, String singer_type) {
		
		return singerMapper.searchSingerList(singer_name,singer_type);
	}
	@Override
	public List<Singer> getList1() {
		// TODO Auto-generated method stub
		return singerMapper.getList1();
	}
	@Override
	public List<Singer> getList2() {
		// TODO Auto-generated method stub
		return singerMapper.getList2();
	}
	@Override
	public List<Singer> getList3() {
		// TODO Auto-generated method stub
		return singerMapper.getList3();
	}
	@Override
	public List<Singer> getList4() {
		// TODO Auto-generated method stub
		return singerMapper.getList4();
	}
	@Override
	public boolean deleteSinger(Singer singer) {
		try {
			singerMapper.deleteSinger(singer);
			return true;
			}
			catch(Exception e) 
			{
				e.printStackTrace();
		return false;
			}
	}
	@Override
	public Singer getList(int singer_id) {
		// TODO Auto-generated method stub
		return singerMapper.getList(singer_id);
	}
	@Override
	public boolean updateSinger(Singer singer) {
		// TODO Auto-generated method stub
		return singerMapper.updateSinger(singer);
	}

}
